#ifndef BANKSYSTEM_HH
#define BANKSYSTEM_HH

#include <map>
#include <memory>
#include <string>
#include "Customer.hh"
#include "AccountIdGenerator.hh"

namespace mini_bank {

class BankSystem {
private:
    std::map<std::string, std::unique_ptr<Customer>> customers;
    AccountIdGenerator idGen;
    int txCounter = 0;

    int    readInt(const std::string& prompt);
    double readDouble(const std::string& prompt);
    std::string nextTxId();
    Account*    findAccountById(const std::string& id);

    void registerCustomer();
    void accessCustomer();
    void listAllAccounts();
    void globalReport();
    void customerMenu(Customer* cust);
    void accountMenu(Account* acc, Customer* cust);

public:
    BankSystem() = default;
    void run();
};

} // namespace mini_bank

#endif // BANKSYSTEM_HH
